<template name="postSubmit">
    <form class="main form">
        <div class="form-group {{errorClass 'url'}}">
            <label class="control-label" for="url">URL</label>
            <div class="controls">
                <input name="url" id="url" type="text" value="" placeholder="http://example.com" class="form-control"/>
                <span class="help-block">{{errorMessage 'url'}}</span>
            </div>
        </div>
        <div class="form-group {{errorClass 'title'}}">
            <label class="control-label" for="title">标题</label>
            <div class="controls">
                <input name="title" id="title" type="text" value="" placeholder="给链接一个名字，方便别人找到它" class="form-control"/>
                <span class="help-block">{{errorMessage 'title'}}</span>
            </div>
        </div>
        <div class="form-group {{errorClass 'category'}}">
            <label class="control-label" for="category">选择分类</label>
            <div class="controls">
                <select name="category" class="form-control">
                    {{#each category}}
                        <option value="{{name}}">{{name}}</option>
                    {{/each}}
                </select>
                <span class="help-block">{{errorMessage 'category'}}</span>
            </div>
        </div>

        <input type="submit" value="提交" class="btn btn-primary"/>
    </form>
</template>